require('./class1')
console.log('当前文件名:',__filename);
console.log('当前目录名:',__dirname);
// 全局对象-global
console.log(111,time)
console.log(222,global.time)
// 全局对象-process
process.on('exit', (code) => {
  setTimeout(() => {
    console.log(777);
  },0);
  console.log(`finished,code: ${code}`);
})
console.log(`finished`);
// 全局对象-console

// 全局函数-定时器函数
let timer = setTimeout(() => {
  console.log('I am setTimeout');
},100);
console.log(111,timer);
clearTimeout(timer);
console.log(222,timer);
// 全局函数-require高级版的<script>标签